package file.a03;

import java.io.StringReader;

public class StringReaderTest {
    public static void main(String[] args) {
        String value="窗前明月光，意思赵固乡";
        try(StringReader sr=new StringReader(value)){
            char[] ccuf=new char[1024];
            int hasRead=0;
            while((hasRead=sr.read(ccuf))>0){
                System.out.println(new String(ccuf,0,hasRead));
            }
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
